package com.heima.Serivce.impl;

import com.heima.Serivce.ScheduleCilent;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.schedule.pojos.Task;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;

@Component
public class ScheduleCillentFallBack implements ScheduleCilent {
    @Override
    public ResponseResult AddTask(Task task) {
        return ResponseResult.errorResult(500,"添加失败，请稍后重试");
    }

    @Override
    public ResponseResult ExecuteTask(@PathVariable("taskType") Integer taskType, @PathVariable("priority") Integer priority) {
        return ResponseResult.errorResult(500,"执行任务失败，请稍后重试");
    }

    @Override
    public ResponseResult DeleteTask(long id) {
        return ResponseResult.errorResult(500,"删除任务失败，请稍后重试");
    }
}
